<?php
require_once "common.php";
//@$part=new part();
//$menu=$part->showMenu();
//print_r($menu);
//@$part=new part();
//$partArray=$part->showPart();
$pid=$_GET[pid];
$aid=$_GET[aid];
if($pid!=""||$aid!=""){
	$part=new part($pid,'','');
	$article=new article($aid,'','','','','');
	$partArray=$part->showPart();
	$menu=$part->showMenu();
	$content=$article->returnArticle();
}
?>
<html>
	<head>
	<title>内容页</title>
	<link rel="stylesheet" href="./css/content.css" type="text/css">
	</head>
	<body>
		<div id="container">
			<div id="header">
				<div id="logo" class="bgcolor">LOGO</div>
				<div id="banner">
					<div id="left" class="bgcolor">BANNER1</div>
					<div id="right" class="bgcolor">BANNER2</div>
				</div>
			</div>
			<div class="nav"></div>
			<div id="menu" class="bgcolor">
			<?php for($i=0;$i<=count($menu);$i++){
				echo "<a href=./list.php?pid=".$menu[$i][pid].">".$menu[$i][part]."</a>&nbsp";											
			} ?>
			</div>
			<div class="nav"></div>
			<div id="content">
			<div id="navigate" style="text-align:left;"><?php $nav=new navigation($pid,$aid);$nav->showNavigate(); ?></div>
			<?php
				echo "<p>".$content[title]."</p>";
				echo "<p>".$content[time]."</p>";
				echo "<hr/>";
				echo "<p>".$content[content]."</p>";
			?>
			</div>
			<div id="sidebar">
				<div class="bar border"><?php echo $partArray[3][part]; ?></div>
				<div class="nav"></div>
				<div class="bar border"><?php echo $partArray[4][part]; ?></div>
				<div class="nav"></div>
				<div class="bar border"><?php echo $partArray[5][part]; ?></div>
				<div class="nav"></div>
			</div>
			<div class="nav"></div>
			<div id="footer" class="bgcolor">页脚</div>
		</div>
			
	</body>
</html>